package com.property.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("t_answer")
public class Answer {

    @TableId
    @Schema(description = "答卷id")
    private String id;

    @Schema(description = "问卷id")
    @TableField("q_id")
    private String qid;

    @Schema(description = "用户id")
    private String userId;

    @Schema(description = "提交id")
    private String commitId;

    @Schema(description = "问题id")
    private String queId;

    @Schema(description = "问题内容")
    private String queContent;

    @Schema(description = "选项id")
    private String optId;

    @Schema(description = "选项名称")
    private String optName;

    @Schema(description = "选项内容")
    private String optContent;

    @Schema(description = "内容")
    private String text;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
}
